﻿@model DotNetClub.Web.ViewModels.User.IndexViewModel

<div class="panel panel-default">
    <div class="panel-heading">
        <ol class="breadcrumb">
            <li><a asp-action="Index" asp-controller="Home">首页</a></li>
            <li>用户信息</li>
        </ol>
    </div>
    <div class="panel-body">
        <p>
            <useravatar email="@Model.User.Email" size="48" title="@Model.User.UserName"></useravatar>
            @Model.User.UserName
        </p>

        <p condition="Model.CollectCount > 0">
            <a asp-action="Collects" asp-controller="User" asp-route-userName="@Model.User.UserName" class="text-muted">
                @Model.CollectCount 个主题收藏
            </a>            
        </p>

        <p>
            <ul class="list-unstyled text-muted">
                <li condition="!string.IsNullOrWhiteSpace(Model.User.WebSite)">
                    <i class="fa fa-lg fa-fw fa-home"></i>
                    <a target="_blank" href="@Model.User.WebSite">@Model.User.WebSite</a>
                </li>
                <li condition="!string.IsNullOrWhiteSpace(Model.User.Location)">
                    <i class="fa fa-lg fa-fw fa-map-marker"></i>
                    @Model.User.Location
                </li>                
            </ul>
        </p>

        <p class="text-muted">
            注册时间: <datetime date="@Model.User.CreateDate"></datetime>
        </p>
    </div>
</div>

<div class="panel panel-default">
    <div class="panel-heading">最近创建的话题</div>
    <div class="panel-body noPadding">
        @Html.Partial("_TopicList", Model.RecentCreatedTopicList)
    </div>
    <div class="panel-footer" condition="Model.RecentCreatedTopicList.Count > 0">
        <a asp-action="Topics" asp-controller="User" asp-route-userName="@Model.User.UserName" class="text-muted">查看更多»</a>
    </div>    
</div>

<div class="panel panel-default">
    <div class="panel-heading">最近参与的话题</div>
    <div class="panel-body noPadding">
        @Html.Partial("_TopicList", Model.RecentCommentedTopicList)
    </div>
    <div class="panel-footer" condition="Model.RecentCommentedTopicList.Count > 0">
        <a asp-action="Comments" asp-controller="User" asp-route-userName="@Model.User.UserName" class="text-muted">查看更多»</a>
    </div>    
</div>